package my.design.visitor;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zp
 * @version 1.0
 * @description: 校长观察者
 * @date 2022/10/22 16:07
 */
public class Principal implements Visitor {

    private final Logger logger = LoggerFactory.getLogger(Principal.class);

    @Override
    public void visit(Student student) {
        logger.info("学⽣信息 姓名：{} 班级类型：{} 班级：{}", student.name,student.identity, student.clazz);
    }

    @Override
    public void visit(Teacher teacher) {
        logger.info("教师班级信息 姓名：{} 教师等级：{}, 班级：{} 升学率：{}", teacher.name,teacher.identity, teacher.clazz, teacher.entranceRatio());
    }
}
